public class Test {
    public static void main(String[] args) {
        MyLinkedList myLinkedList = new MyLinkedList();
        myLinkedList.addFist(1);
        myLinkedList.addLast(2);
        myLinkedList.addLast(3);
        myLinkedList.removeFirst(3);
        myLinkedList.display();
    }
    public static void main2(String[] args) {
        MySingleList mySingleList1=new MySingleList();

        mySingleList1.addFirst(2);
        mySingleList1.addFirst(7);
        mySingleList1.addLast(7);
        mySingleList1.show();

        mySingleList1.removeAllKey(7);
        mySingleList1.show();
    }
    public static void main1(String[] args) {
       MySingleList mySingleList=new MySingleList();
        mySingleList.creat();
       mySingleList.show();
        System.out.println("------------");
        MySingleList mySingleList1=new MySingleList();
        mySingleList1.addFirst(1);
        mySingleList1.addFirst(2);
        mySingleList1.addFirst(3);
        mySingleList1.addFirst(4);
        mySingleList1.addFirst(5);
        mySingleList1.addFirst(6);
        mySingleList1.addLast(7);
        mySingleList1.show();
       mySingleList1.addAll(3,99);
        mySingleList1.show();
        System.out.println(mySingleList1.contains(99));
        System.out.println(mySingleList1.contains(999));
        mySingleList1.removeFistKey(100);
        mySingleList1.show();
   MySingleList.ListNode nwehead = mySingleList1.reverseList(mySingleList1.head);
       mySingleList1.show(nwehead);
      MySingleList.ListNode nwehead1 = mySingleList1.reverseList(nwehead);
       mySingleList1.show(nwehead1);
        mySingleList1.reverseList1();
        mySingleList1.show();
    }
}
